package com.yl.chainStore.pojo.vo.pay

import com.yl.chainStore.common.Constants
import com.yl.common.annotation.NoArg
import java.math.BigDecimal
import java.math.RoundingMode

@NoArg
data class ArrearsOrderPayVo(

	val orderId:Long,

	var payMoney:Long,
){

	var payMoneyShow: BigDecimal?= null
	get() {

		if(field == null){
			return BigDecimal(payMoney.div(Constants.OtherConfig.MONEY_TO_DB_DOUBLE)).setScale(2, RoundingMode.HALF_UP)
		}
		return field
	}
	set(value) {
		if(value != null){
			payMoney = (value.multiply(BigDecimal(Constants.OtherConfig.MONEY_TO_DB_DOUBLE))).toLong()
			field = value
		}
	}
}
